{% extends "docker_engine/base.html" %}


{% load staticfiles %}

{% block extra-css %}
<link rel="stylesheet" type="text/css" href="{% static 'docker_engine/assets/fancybox/source/jquery.fancybox.css' %}" />
<link rel="stylesheet" type="text/css" href="{% static 'docker_engine/assets/uniform/css/uniform.default.css' %}" />
<link rel="stylesheet" type="text/css" href="{% static 'docker_engine/assets/chosen-bootstrap/chosen/chosen.css' %}" />
{% endblock %}


{% block content %}
<div id="page" class="dashboard">
    <!-- BEGIN SAMPLE FORM PORTLET-->   
    <div class="widget">
        <div class="widget-title">
            <h4><i class="icon-reorder"></i> New Task</h4>                   
        </div>
        <div class="widget-body form">
            <!-- BEGIN FORM-->
            <form action="/docker/task/create/" method="post" class="form-horizontal">
                {% csrf_token %}
                <div class="control-group">
                    <label class="control-label" for="task_name">Task Name</label>
                    <div class="controls">
                        <input type="text" class="span6 popovers" name="task_name" data-trigger="hover" data-content="Name the task you prepare to create." data-original-title="Task Name" />
                    </div>
                </div>

                <div class="control-group">
                    <label class="control-label">Application</label>
                    <div class="controls">
                        <select data-placeholder="Choose application" class="chosen span6" tabindex="-1" name="application_name">
                            <option value=""></option>
                            <optgroup label="Applications">
                                {% for application in applications %}
                                <option>{{application.name}}</option>
                                {% endfor %}
                            </optgroup>
                        </select>
                    </div>
                </div>

                <div class="form-actions">
                    <a href="{% url 'task_create' %}"><button type="submit" class="btn btn-primary">Create</button></a>
                    <a href="{% url 'task_index' %}"><button type="button" class="btn">Cancel</button></a>
                </div>
            </form>
            <!-- END FORM-->             
        </div>
    </div>
    <!-- END SAMPLE FORM PORTLET-->
</div>
{% endblock %}


{% block extra-js %}
<script src="{% static 'docker_engine/assets/chosen-bootstrap/chosen/chosen.jquery.min.js' %}"></script>
<script src="{% static 'docker_engine/assets/uniform/jquery.uniform.min.js' %}"></script>
<script src="{% static 'docker_engine/assets/fancybox/source/jquery.fancybox.pack.js' %}"></script>
<script src="{% static 'docker_engine/js/task/new.js' %}"></script>
{% endblock %}